﻿<%@ Page Language="C#" %>

<% 
    String keyword = Request["keyword"];

    System.Collections.Generic.List<DTO.NguoiDungDto> nguoidung =
        BUS.NguoiDungBus.LayKhachHangTimKiem(keyword);
    
    Response.Write("<table width='100%' align='center'");
    Response.Write("<tr>");
    Response.Write("<td>Mã</td>");
    Response.Write("<td>Tên Đăng Nhập</td>");
    Response.Write("<td>Họ Tên</td>");
    Response.Write("<td>Email</td>");
    Response.Write("<td>Trạng Thái</td>");
    Response.Write("<td></td>");
    Response.Write("</tr>");
    for (int i = 0; i < nguoidung.Count; i++)
    {
       
        Response.Write("<tr>");
        Response.Write("<td>" + nguoidung[i].Ma + "</td>");
        Response.Write("<td>" + nguoidung[i].TenDangNhap + "</td>");
        Response.Write("<td id='tdHoTen" + nguoidung[i].Ma + "'>" + nguoidung[i].HoTen + "</td>");
        Response.Write("<td id='tdEmail" + nguoidung[i].Ma + "'>" + nguoidung[i].Email + "</td>");
        Response.Write("<td id='tdTrangThai" + nguoidung[i].Ma + "'>" + nguoidung[i].TrangThai + "</td>");
        
        Response.Write("<td>" + "<input  value='Chi Tiết' type='button' onclick='showChiTietKhachHang(" + nguoidung[i].Ma +");'" + "</td>");
        
      
        Response.Write("</tr>");
        Response.Write("<tr>");
        Response.Write("<td colspan='6'>" + "<div name='divChiTiet' id='divShow" + nguoidung[i].Ma + "'></div>" + "</td>");
        Response.Write("</tr>");
    }
    Response.Write("</table>");
%>
